package keter.dao.org.impl;

import keter.dao.base.KeterAbstractDao;
import keter.dao.org.AccountDao;
import keter.domain.Account;

import org.apache.log4j.Logger;
import org.springframework.stereotype.Repository;

@Repository
public class AccountDaoImpl extends KeterAbstractDao<Account> implements AccountDao {
	/**
	 * Logger for this class
	 */
	private static final Logger logger = Logger.getLogger(AccountDaoImpl.class);

	@Override
	public Account findByName(String name) {
		return getSingleResult("from Account u where u.name = :name", 
				wrap("name"),
				wrap(name));
	}

//	@Override
//	public Account findByLogin(String login) {
//		return getSingleResult("from Account u where u.sno = :login or u.name = :login", 
//				wrap("login","login"),
//				wrap(login,login)
//			   );
//	}

}
